﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DrugsShopManagement.DBCLASS
{
    class getSqlConnection
    {
        public static string conStr = "server=.;database=Drugs;uid=sa;pwd=123456;Asynchronous Processing=True;";
        SqlConnection G_Con;  //声明链接对象

        public getSqlConnection()
        {

        }

        // 连接数据库
        public SqlConnection GetCon()
        {
            G_Con = new SqlConnection(conStr);
            G_Con.Open();
            return G_Con;
        }
    }
}
